package com.atguigu.ssyx.acl.service;

import com.atguigu.ssyx.model.acl.Permission;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * @author ZhangYK
 * @version 8.0
 * @title PermissionService
 * @description
 * @create 2024/7/6 13:42
 */
public interface PermissionService extends IService<Permission> {
    /**
     * 获取菜单列表
     * @return
     */
    List<Permission> queryAllMenu();

    /**
     * 递归删除菜单
     * @param id
     */
    void removeChildById(Long id);

    /**
     * 获得所有菜单和已分配的菜单
     * @param roleId
     * @return
     */
    Map<String, Object> getPermissionByRoleId(Long roleId);

    Map<String, Object> findPermissionByRoleId(Long roleId);

    void saveRolePermissionRealtionShip(Long roleId, Long[] permissionId);
}
